﻿<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" throwExceptions="true" internalLogFile="d:\1.txt">
  <targets>
    <default-target-parameters xsi:type="File" encoding="utf-8" concurrentWrites="false" archiveAboveSize="10240000" />
    <default-wrapper xsi:type="AsyncWrapper" queueLimit="5000" overflowAction="Discard" />
    <target name="file" xsi:type="File" fileName="${basedir}App_Data\Logs\${shortdate}\log.log"
            layout="Date：${longdate}${newline}Message：${message}${newline}Exception：${exception}${newline}Level：${level}${newline}Logger：${logger}${newline}ThreadId：${threadid}${newline}====================================================================================================" />
    <target xsi:type="Console" layout="${message}" name="console" />
    <!--<target name="event" xsi:type="EventLog"
            layout="Date：${longdate}${newline}Message：${message}${newline}Exception：${exception}${newline}Level：${level}${newline}Shell：${shell}${newline}Logger：${logger}${newline}ThreadId：${threadid}" />-->
  </targets>
  <rules>
    <logger name="*" writeTo="file,console" minlevel="Trace" />
  </rules>
</nlog>
<!--
    FullLayout
    Date：${longdate}${newline}Message：${message}${newline}Exception：${exception}${newline}Level：${level}${newline}Shell：${shell}${newline}Logger：${logger}${newline}ProcessId：${processid}${newline}ProcessName：${processname:fullName=true}${newline}ProcessTime：processtime=${processtime}${newline}ThreadId：${threadid}${newline}ThreadName：${threadname}${newline}WindowsIdentity：${windows-identity:userName=true:domain=true}${newline}====================================================================================================
    SimpleLayout
    Date：${longdate}${newline}Message：${message}${newline}Exception：${exception}${newline}Level：${level}${newline}Shell：${shell}${newline}Logger：${logger}${newline}ThreadId：${threadid}${newline}====================================================================================================
-->